#ifndef _stm8_eeprom_H
#define _stm8_eeprom_H

#include "Common.h"

#define  Base_addeerom    0x4000

#define  Base_addeerom_dizhi    0x4000+128

void write_iap(UINT16 u16_addr,UINT8 u8_data);//reentrant
void write_iap_copy(UINT16 u16_addr,UINT8 u8_data) ;
UINT8 read_iap(UINT16 code *u16_addr);
void  Write_eerom(void);
void  Read_eerom(void );
void Initeeprom(void);


extern	Out_TypeDef  Out;
extern	Out_TypeDef  buff;
extern	Out_TypeDef  temp;
extern  BitStatus   Auto_mode;
extern  u8          mode,diy_n;
extern  u16          Speed;
extern  u8          Speed_class,dim_val,dim_cw,dim_ww;
extern  u8          Yh_val;

extern u8          ID[3];
extern u8          ID2[3];
extern u8          FALG_addr;
extern u8          Yh_val,CW_Val,WW_Val,W_flag;
extern BitStatus   On_off,On_offWW,On_offCW;

#endif